\(\int (g \cos (e+f x))^{1-2 m} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1+m} \, dx\) [174]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (warning: unable to verify)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [F]
   Giac [B] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 42, antiderivative size = 57 \[ \int (g \cos (e+f x))^{1-2 m} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1+m} \, dx=-\frac {g (g \cos (e+f x))^{-2 m} \log (1-\sin (e+f x)) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^m}{c f} \]

[Out]

-g*ln(1-sin(f*x+e))*(a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^m/c/f/((g*cos(f*x+e))^(2*m))

Rubi [A] (verified)

Time = 0.15 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {2922, 12, 2746, 31} \[ \int (g \cos (e+f x))^{1-2 m} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1+m} \, dx=-\frac {g \log (1-\sin (e+f x)) (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^m (g \cos (e+f x))^{-2 m}}{c f} \]

[In]

Int[(g*Cos[e + f*x])^(1 - 2*m)*(a + a*Sin[e + f*x])^m*(c - c*Sin[e + f*x])^(-1 + m),x]

[Out]

-((g*Log[1 - Sin[e + f*x]]*(a + a*Sin[e + f*x])^m*(c - c*Sin[e + f*x])^m)/(c*f*(g*Cos[e + f*x])^(2*m)))

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 2746

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2, 0] && (GeQ[p, -1] ||  !IntegerQ[m + 1/2])

Rule 2922

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) +
 (f_.)*(x_)])^(n_), x_Symbol] :> Dist[a^IntPart[m]*c^IntPart[m]*(a + b*Sin[e + f*x])^FracPart[m]*((c + d*Sin[e
 + f*x])^FracPart[m]/(g^(2*IntPart[m])*(g*Cos[e + f*x])^(2*FracPart[m]))), Int[(g*Cos[e + f*x])^(2*m + p)/(c +
 d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0]
 && EqQ[2*m + p - 1, 0] && EqQ[m - n - 1, 0]

Rubi steps \begin{align*} \text {integral}& = \left ((g \cos (e+f x))^{-2 m} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^m\right ) \int \frac {g \cos (e+f x)}{c-c \sin (e+f x)} \, dx \\ & = \left (g (g \cos (e+f x))^{-2 m} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^m\right ) \int \frac {\cos (e+f x)}{c-c \sin (e+f x)} \, dx \\ & = -\frac {\left (g (g \cos (e+f x))^{-2 m} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^m\right ) \text {Subst}\left (\int \frac {1}{c+x} \, dx,x,-c \sin (e+f x)\right )}{c f} \\ & = -\frac {g (g \cos (e+f x))^{-2 m} \log (1-\sin (e+f x)) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^m}{c f} \\ \end{align*}

Mathematica [A] (verified)

Time = 16.34 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.33 \[ \int (g \cos (e+f x))^{1-2 m} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1+m} \, dx=\frac {g (g \cos (e+f x))^{-2 m} \left (\log \left (\sec ^2\left (\frac {1}{2} (e+f x)\right )\right )-2 \log \left (1-\tan \left (\frac {1}{2} (e+f x)\right )\right )\right ) (a (1+\sin (e+f x)))^m (c-c \sin (e+f x))^m}{c f} \]

[In]

Integrate[(g*Cos[e + f*x])^(1 - 2*m)*(a + a*Sin[e + f*x])^m*(c - c*Sin[e + f*x])^(-1 + m),x]

[Out]

(g*(Log[Sec[(e + f*x)/2]^2] - 2*Log[1 - Tan[(e + f*x)/2]])*(a*(1 + Sin[e + f*x]))^m*(c - c*Sin[e + f*x])^m)/(c
*f*(g*Cos[e + f*x])^(2*m))

Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 2.04 (sec) , antiderivative size = 3232, normalized size of antiderivative = 56.70

method result size
risch \(\text {Expression too large to display}\) \(3232\)

[In]

int((g*cos(f*x+e))^(1-2*m)*(a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^(-1+m),x,method=_RETURNVERBOSE)

[Out]

I/f*g*a^m/c*g^(-2*m)*c^m*exp(1/2*I*Pi*(1+2*m*csgn(I*(exp(I*(f*x+e))+I)*(-1+I*exp(-I*(f*x+e))))*csgn(I*g*(exp(I
*(f*x+e))-I)*(1+I*exp(-I*(f*x+e))))^2+2*m*csgn(I*(exp(I*(f*x+e))-I))*csgn(I*(exp(I*(f*x+e))-I)^2)^2+2*m*csgn(I
*(exp(I*(f*x+e))+I))*csgn(I*(exp(I*(f*x+e))+I)^2)^2-m*csgn(I*(exp(I*(f*x+e))+I)^2)^3-m*csgn(I*exp(-I*(f*x+e))*
(exp(I*(f*x+e))+I)^2)^3-m*csgn(c*(exp(I*(f*x+e))-I)^2*exp(-I*(f*x+e)))^2+m*csgn(c*(exp(I*(f*x+e))-I)^2*exp(-I*
(f*x+e)))^3+csgn(I*(exp(I*(f*x+e))-I))^2*csgn(I*(exp(I*(f*x+e))-I)^2)-2*csgn(I*(exp(I*(f*x+e))-I))*csgn(I*(exp
(I*(f*x+e))-I)^2)^2-m*csgn(a*(exp(I*(f*x+e))+I)^2*exp(-I*(f*x+e)))^3-csgn(I*(exp(I*(f*x+e))-I)^2*exp(-I*(f*x+e
)))*csgn(I*c*(exp(I*(f*x+e))-I)^2*exp(-I*(f*x+e)))^2-m*csgn(I*(exp(I*(f*x+e))-I)^2)^3-2*m*csgn(I*(exp(I*(f*x+e
))+I)*(-1+I*exp(-I*(f*x+e))))^3+csgn(I*g)*csgn(I*g*(exp(I*(f*x+e))-I)*(1+I*exp(-I*(f*x+e))))^2+csgn(I*(exp(I*(
f*x+e))-I)*(exp(I*(f*x+e))+I))^2*csgn(I*(exp(I*(f*x+e))+I))+csgn(I*(exp(I*(f*x+e))+I)*(-1+I*exp(-I*(f*x+e))))^
2*csgn(I*exp(-I*(f*x+e)))+csgn(I*(exp(I*(f*x+e))-I)*(exp(I*(f*x+e))+I))*csgn(I*(exp(I*(f*x+e))+I)*(-1+I*exp(-I
*(f*x+e))))^2+csgn(I*(exp(I*(f*x+e))-I)*(exp(I*(f*x+e))+I))^2*csgn(I*(exp(I*(f*x+e))-I))-csgn(I*c*(exp(I*(f*x+
e))-I)^2*exp(-I*(f*x+e)))*csgn(c*(exp(I*(f*x+e))-I)^2*exp(-I*(f*x+e)))^2-m*csgn(I*a*(exp(I*(f*x+e))+I)^2*exp(-
I*(f*x+e)))^3-csgn(I*(exp(I*(f*x+e))+I)*(-1+I*exp(-I*(f*x+e))))*csgn(I*g*(exp(I*(f*x+e))-I)*(1+I*exp(-I*(f*x+e
))))^2+csgn(I*c*(exp(I*(f*x+e))-I)^2*exp(-I*(f*x+e)))*csgn(c*(exp(I*(f*x+e))-I)^2*exp(-I*(f*x+e)))-csgn(I*(exp
(I*(f*x+e))-I)^2)*csgn(I*(exp(I*(f*x+e))-I)^2*exp(-I*(f*x+e)))^2-csgn(I*exp(-I*(f*x+e)))*csgn(I*(exp(I*(f*x+e)
)-I)^2*exp(-I*(f*x+e)))^2-csgn(I*c)*csgn(I*c*(exp(I*(f*x+e))-I)^2*exp(-I*(f*x+e)))^2+m*csgn(a*(exp(I*(f*x+e))+
I)^2*exp(-I*(f*x+e)))^2-m*csgn(I*(exp(I*(f*x+e))-I)^2*exp(-I*(f*x+e)))^3-m*csgn(I*c*(exp(I*(f*x+e))-I)^2*exp(-
I*(f*x+e)))^3+csgn(I*c*(exp(I*(f*x+e))-I)^2*exp(-I*(f*x+e)))^3-2*m*csgn(I*(exp(I*(f*x+e))-I)*(exp(I*(f*x+e))+I
))*csgn(I*(exp(I*(f*x+e))+I)*(-1+I*exp(-I*(f*x+e))))*csgn(I*exp(-I*(f*x+e)))-2*m*csgn(I*g)*csgn(I*(exp(I*(f*x+
e))+I)*(-1+I*exp(-I*(f*x+e))))*csgn(I*g*(exp(I*(f*x+e))-I)*(1+I*exp(-I*(f*x+e))))-m*csgn(I*(exp(I*(f*x+e))-I)^
2)*csgn(I*exp(-I*(f*x+e)))*csgn(I*(exp(I*(f*x+e))-I)^2*exp(-I*(f*x+e)))-m*csgn(I*c)*csgn(I*(exp(I*(f*x+e))-I)^
2*exp(-I*(f*x+e)))*csgn(I*c*(exp(I*(f*x+e))-I)^2*exp(-I*(f*x+e)))-m*csgn(I*a)*csgn(I*exp(-I*(f*x+e))*(exp(I*(f
*x+e))+I)^2)*csgn(I*a*(exp(I*(f*x+e))+I)^2*exp(-I*(f*x+e)))-m*csgn(I*(exp(I*(f*x+e))+I)^2)*csgn(I*exp(-I*(f*x+
e)))*csgn(I*exp(-I*(f*x+e))*(exp(I*(f*x+e))+I)^2)+m*csgn(I*(exp(I*(f*x+e))-I)^2)*csgn(I*(exp(I*(f*x+e))-I)^2*e
xp(-I*(f*x+e)))^2+m*csgn(I*exp(-I*(f*x+e)))*csgn(I*(exp(I*(f*x+e))-I)^2*exp(-I*(f*x+e)))^2+m*csgn(I*exp(-I*(f*
x+e))*(exp(I*(f*x+e))+I)^2)*csgn(I*a*(exp(I*(f*x+e))+I)^2*exp(-I*(f*x+e)))^2+csgn(I*g)*csgn(I*(exp(I*(f*x+e))+
I)*(-1+I*exp(-I*(f*x+e))))*csgn(I*g*(exp(I*(f*x+e))-I)*(1+I*exp(-I*(f*x+e))))+m*csgn(I*c*(exp(I*(f*x+e))-I)^2*
exp(-I*(f*x+e)))*csgn(c*(exp(I*(f*x+e))-I)^2*exp(-I*(f*x+e)))^2+2*m*csgn(I*(exp(I*(f*x+e))-I)*(exp(I*(f*x+e))+
I))*csgn(I*(exp(I*(f*x+e))-I))*csgn(I*(exp(I*(f*x+e))+I))-csgn(I*(exp(I*(f*x+e))-I)*(exp(I*(f*x+e))+I))^3+2*m*
csgn(I*g*(exp(I*(f*x+e))-I)*(1+I*exp(-I*(f*x+e))))^3+2*m*csgn(I*(exp(I*(f*x+e))-I)*(exp(I*(f*x+e))+I))^3+csgn(
I*(exp(I*(f*x+e))-I)^2)^3+csgn(c*(exp(I*(f*x+e))-I)^2*exp(-I*(f*x+e)))^2-csgn(c*(exp(I*(f*x+e))-I)^2*exp(-I*(f
*x+e)))^3-m*csgn(I*(exp(I*(f*x+e))-I))^2*csgn(I*(exp(I*(f*x+e))-I)^2)-2*m*csgn(I*g)*csgn(I*g*(exp(I*(f*x+e))-I
)*(1+I*exp(-I*(f*x+e))))^2-2*m*csgn(I*(exp(I*(f*x+e))-I)*(exp(I*(f*x+e))+I))^2*csgn(I*(exp(I*(f*x+e))-I))-csgn
(I*(exp(I*(f*x+e))-I)*(exp(I*(f*x+e))+I))*csgn(I*(exp(I*(f*x+e))-I))*csgn(I*(exp(I*(f*x+e))+I))+csgn(I*(exp(I*
(f*x+e))-I)*(exp(I*(f*x+e))+I))*csgn(I*(exp(I*(f*x+e))+I)*(-1+I*exp(-I*(f*x+e))))*csgn(I*exp(-I*(f*x+e)))-2*m*
csgn(I*(exp(I*(f*x+e))-I)*(exp(I*(f*x+e))+I))*csgn(I*(exp(I*(f*x+e))+I)*(-1+I*exp(-I*(f*x+e))))^2+m*csgn(I*a*(
exp(I*(f*x+e))+I)^2*exp(-I*(f*x+e)))*csgn(a*(exp(I*(f*x+e))+I)^2*exp(-I*(f*x+e)))^2-m*csgn(I*a*(exp(I*(f*x+e))
+I)^2*exp(-I*(f*x+e)))*csgn(a*(exp(I*(f*x+e))+I)^2*exp(-I*(f*x+e)))-2*m*csgn(I*(exp(I*(f*x+e))-I)*(exp(I*(f*x+
e))+I))^2*csgn(I*(exp(I*(f*x+e))+I))-2*m*csgn(I*(exp(I*(f*x+e))+I)*(-1+I*exp(-I*(f*x+e))))^2*csgn(I*exp(-I*(f*
x+e)))+csgn(I*c)*csgn(I*(exp(I*(f*x+e))-I)^2*exp(-I*(f*x+e)))*csgn(I*c*(exp(I*(f*x+e))-I)^2*exp(-I*(f*x+e)))+m
*csgn(I*(exp(I*(f*x+e))-I)^2*exp(-I*(f*x+e)))*csgn(I*c*(exp(I*(f*x+e))-I)^2*exp(-I*(f*x+e)))^2+csgn(I*(exp(I*(
f*x+e))-I)^2)*csgn(I*exp(-I*(f*x+e)))*csgn(I*(exp(I*(f*x+e))-I)^2*exp(-I*(f*x+e)))+m*csgn(I*exp(-I*(f*x+e)))*c
sgn(I*exp(-I*(f*x+e))*(exp(I*(f*x+e))+I)^2)^2+m*csgn(I*(exp(I*(f*x+e))+I)^2)*csgn(I*exp(-I*(f*x+e))*(exp(I*(f*
x+e))+I)^2)^2-m*csgn(I*(exp(I*(f*x+e))+I))^2*csgn(I*(exp(I*(f*x+e))+I)^2)+m*csgn(I*a)*csgn(I*a*(exp(I*(f*x+e))
+I)^2*exp(-I*(f*x+e)))^2+m*csgn(I*c)*csgn(I*c*(exp(I*(f*x+e))-I)^2*exp(-I*(f*x+e)))^2-m*csgn(I*c*(exp(I*(f*x+e
))-I)^2*exp(-I*(f*x+e)))*csgn(c*(exp(I*(f*x+e))-I)^2*exp(-I*(f*x+e)))-csgn(I*g*(exp(I*(f*x+e))-I)*(1+I*exp(-I*
(f*x+e))))^3+csgn(I*(exp(I*(f*x+e))-I)^2*exp(-I*(f*x+e)))^3+csgn(I*(exp(I*(f*x+e))+I)*(-1+I*exp(-I*(f*x+e))))^
3))*(-ln(exp(I*(f*x+e)))+2*ln(exp(I*(f*x+e))-I))

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.53 \[ \int (g \cos (e+f x))^{1-2 m} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1+m} \, dx=-\frac {a \left (\frac {a c}{g^{2}}\right )^{m - 1} \log \left (-\sin \left (f x + e\right ) + 1\right )}{f g} \]

[In]

integrate((g*cos(f*x+e))^(1-2*m)*(a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^(-1+m),x, algorithm="fricas")

[Out]

-a*(a*c/g^2)^(m - 1)*log(-sin(f*x + e) + 1)/(f*g)

Sympy [F(-1)]

Timed out. \[ \int (g \cos (e+f x))^{1-2 m} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1+m} \, dx=\text {Timed out} \]

[In]

integrate((g*cos(f*x+e))**(1-2*m)*(a+a*sin(f*x+e))**m*(c-c*sin(f*x+e))**(-1+m),x)

[Out]

Timed out

Maxima [F]

\[ \int (g \cos (e+f x))^{1-2 m} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1+m} \, dx=\int { \left (g \cos \left (f x + e\right )\right )^{-2 \, m + 1} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} {\left (-c \sin \left (f x + e\right ) + c\right )}^{m - 1} \,d x } \]

[In]

integrate((g*cos(f*x+e))^(1-2*m)*(a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^(-1+m),x, algorithm="maxima")

[Out]

integrate((g*cos(f*x + e))^(-2*m + 1)*(a*sin(f*x + e) + a)^m*(-c*sin(f*x + e) + c)^(m - 1), x)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 934 vs. \(2 (59) = 118\).

Time = 0.69 (sec) , antiderivative size = 934, normalized size of antiderivative = 16.39 \[ \int (g \cos (e+f x))^{1-2 m} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1+m} \, dx=\text {Too large to display} \]

[In]

integrate((g*cos(f*x+e))^(1-2*m)*(a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^(-1+m),x, algorithm="giac")

[Out]

1/2*(4*pi*e^(m*log(abs(a)) + m*log(abs(c)) - 2*m*log(abs(g)) - log(abs(c)) + log(abs(g)))*floor(1/4*(pi + 2*f*
x - 4*pi*floor(1/2*(pi + f*x + e)/pi) + 2*e)/pi)*tan(1/4*pi + pi*m*floor(-1/4*sgn(a) + 1/2) + pi*m*floor(-1/4*
sgn(c) + 1) + 1/4*pi*m*sgn(a) + 1/4*pi*m*sgn(c) - 1/2*pi*m*sgn(g) - pi*floor(-1/4*sgn(c) + 1) - 1/4*pi*sgn(c)
+ 1/4*pi*sgn(g))^2 + 4*pi*e^(m*log(abs(a)) + m*log(abs(c)) - 2*m*log(abs(g)) - log(abs(c)) + log(abs(g)))*floo
r(1/2*(pi + f*x + e)/pi)*tan(1/4*pi + pi*m*floor(-1/4*sgn(a) + 1/2) + pi*m*floor(-1/4*sgn(c) + 1) + 1/4*pi*m*s
gn(a) + 1/4*pi*m*sgn(c) - 1/2*pi*m*sgn(g) - pi*floor(-1/4*sgn(c) + 1) - 1/4*pi*sgn(c) + 1/4*pi*sgn(g))^2 + 2*p
i*e^(m*log(abs(a)) + m*log(abs(c)) - 2*m*log(abs(g)) - log(abs(c)) + log(abs(g)))*sgn(tan(1/2*f*x + 1/2*e)^2 -
 1)*tan(1/4*pi + pi*m*floor(-1/4*sgn(a) + 1/2) + pi*m*floor(-1/4*sgn(c) + 1) + 1/4*pi*m*sgn(a) + 1/4*pi*m*sgn(
c) - 1/2*pi*m*sgn(g) - pi*floor(-1/4*sgn(c) + 1) - 1/4*pi*sgn(c) + 1/4*pi*sgn(g))^2 + 3*pi*e^(m*log(abs(a)) +
m*log(abs(c)) - 2*m*log(abs(g)) - log(abs(c)) + log(abs(g)))*tan(1/4*pi + pi*m*floor(-1/4*sgn(a) + 1/2) + pi*m
*floor(-1/4*sgn(c) + 1) + 1/4*pi*m*sgn(a) + 1/4*pi*m*sgn(c) - 1/2*pi*m*sgn(g) - pi*floor(-1/4*sgn(c) + 1) - 1/
4*pi*sgn(c) + 1/4*pi*sgn(g))^2 - 2*e*e^(m*log(abs(a)) + m*log(abs(c)) - 2*m*log(abs(g)) - log(abs(c)) + log(ab
s(g)))*tan(1/4*pi + pi*m*floor(-1/4*sgn(a) + 1/2) + pi*m*floor(-1/4*sgn(c) + 1) + 1/4*pi*m*sgn(a) + 1/4*pi*m*s
gn(c) - 1/2*pi*m*sgn(g) - pi*floor(-1/4*sgn(c) + 1) - 1/4*pi*sgn(c) + 1/4*pi*sgn(g))^2 - 4*pi*e^(m*log(abs(a))
 + m*log(abs(c)) - 2*m*log(abs(g)) - log(abs(c)) + log(abs(g)))*floor(1/4*(pi + 2*f*x - 4*pi*floor(1/2*(pi + f
*x + e)/pi) + 2*e)/pi) - 4*pi*e^(m*log(abs(a)) + m*log(abs(c)) - 2*m*log(abs(g)) - log(abs(c)) + log(abs(g)))*
floor(1/2*(pi + f*x + e)/pi) - 2*pi*e^(m*log(abs(a)) + m*log(abs(c)) - 2*m*log(abs(g)) - log(abs(c)) + log(abs
(g)))*sgn(tan(1/2*f*x + 1/2*e)^2 - 1) - 4*e^(m*log(abs(a)) + m*log(abs(c)) - 2*m*log(abs(g)) - log(abs(c)) + l
og(abs(g)))*log(2*(tan(1/2*f*x + 1/2*e)^2 - 2*tan(1/2*f*x + 1/2*e) + 1)/(tan(1/2*f*x + 1/2*e)^2 + 1))*tan(1/4*
pi + pi*m*floor(-1/4*sgn(a) + 1/2) + pi*m*floor(-1/4*sgn(c) + 1) + 1/4*pi*m*sgn(a) + 1/4*pi*m*sgn(c) - 1/2*pi*
m*sgn(g) - pi*floor(-1/4*sgn(c) + 1) - 1/4*pi*sgn(c) + 1/4*pi*sgn(g)) - 3*pi*e^(m*log(abs(a)) + m*log(abs(c))
- 2*m*log(abs(g)) - log(abs(c)) + log(abs(g))) + 2*e*e^(m*log(abs(a)) + m*log(abs(c)) - 2*m*log(abs(g)) - log(
abs(c)) + log(abs(g))))/(f*tan(1/4*pi + pi*m*floor(-1/4*sgn(a) + 1/2) + pi*m*floor(-1/4*sgn(c) + 1) + 1/4*pi*m
*sgn(a) + 1/4*pi*m*sgn(c) - 1/2*pi*m*sgn(g) - pi*floor(-1/4*sgn(c) + 1) - 1/4*pi*sgn(c) + 1/4*pi*sgn(g))^2 + f
)

Mupad [F(-1)]

Timed out. \[ \int (g \cos (e+f x))^{1-2 m} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1+m} \, dx=\int {\left (g\,\cos \left (e+f\,x\right )\right )}^{1-2\,m}\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^m\,{\left (c-c\,\sin \left (e+f\,x\right )\right )}^{m-1} \,d x \]

[In]

int((g*cos(e + f*x))^(1 - 2*m)*(a + a*sin(e + f*x))^m*(c - c*sin(e + f*x))^(m - 1),x)

[Out]

int((g*cos(e + f*x))^(1 - 2*m)*(a + a*sin(e + f*x))^m*(c - c*sin(e + f*x))^(m - 1), x)